@import '~@angular/material/theming';

// Mixin to apply theme colors for both generated API docs and markdown docs (guides/overviews).
@mixin docs-site-tables-theme($theme) {
  $primary: map-get($theme, primary);
  $accent: map-get($theme, accent);
  $warn: map-get($theme, warn);
  $background: map-get($theme, background);
  $foreground: map-get($theme, foreground);
  $is-dark-theme: map-get($theme, is-dark);
  $tableBorderOpacity: if($is-dark-theme, 0.08, 0.03);
  
  .docs-api table,
  .docs-markdown-table {
    color: mat-color($foreground, text);
  }

  .docs-api th,
  .docs-markdown-th {
    background: mat-color($background, app-bar);
  }

  .docs-api td,
  .docs-markdown-td {
    border: 1px solid rgba(mat-color($foreground, secondary-text), $tableBorderOpacity);
  }
}
